import { lazy } from 'react';

import Home from '@/pages/home';
import lazyLoadComp from '@/router/lazyComp';

const AuthGuardLayout = lazy(() => import('@/router/components/AuthGuardLayout'));

const homeRouter = [
	{
		id: 'root',
		path: '/',
		element: lazyLoadComp(AuthGuardLayout),
		handle: { constant: true },
		children: [
			{
				index: true, // ✅ 默认子路由
				element: lazyLoadComp(Home)
			},
			{
				path: 'home',
				id: 'home',
				handle: { constant: true, title: '首页', icon: 'mdi:monitor-dashboard' },
				element: lazyLoadComp(Home)
			}
		]
	}
];

export default homeRouter;
